#ifndef AT_NETWORK_MQTT_ONNET_EC800_h
#define AT_NETWORK_MQTT_ONNET_EC800_h

#include "./AtNetworkMqttClientEC800.h"

class AtNetworkMqttOnenetEC800 : public AtNetworkMqttClientEC800 {
  protected:
    uint32_t lastWriteTime;

  public:
    AtNetworkMqttOnenetEC800(AtNetworkDevice *device)
        : AtNetworkMqttClientEC800(device) {
      // 注释占位
    }

    ~AtNetworkMqttOnenetEC800() {

    };

    /**
     * 发布数据
     */
    virtual bool publish(const char *topic, char *body, size_t length);

    /**
     * 订阅主题(控制并发)
     */
    virtual bool subscribe(AtNetworkMqttTopic *topic, uint8_t qos);

    /**
     * 取消订阅主题(控制并发)
     */
    virtual bool unsubscribe(AtNetworkMqttTopic *topic);

    /**
     * 初始化ONENET服务
     * @param timeout 超时时长
     */
    virtual bool connect(uint32_t timeout = 10000);
};

#endif